//
//  TBBLEDevice.h
//  TBSDK
//
//  Created by nexgo on 2017/10/27.
//  Copyright © 2017年 truth. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreBluetooth/CoreBluetooth.h>

@interface TBBLEDevice : NSObject

@property (nonatomic,copy) CBPeripheral* peripheral;
@property (nonatomic,copy) NSDictionary<NSString *, id>* advertisementData;
@property (nonatomic) int currentRssi;
@property (nonatomic) int rssi;

/**
 判断是否是同一个设备
 @param device1 设备1
 @param device2 设备2
 */
+(BOOL)isEque:(TBBLEDevice*)device1 device2:(TBBLEDevice*)device2;

- (instancetype)init:(CBPeripheral *)peripheral advertisementData:(NSDictionary<NSString *, id> *)advertisementData RSSI:(NSNumber *)RSSI;

/**
 更新信息
 @param device 目标信息
 */
-(void)refreshInfo:(TBBLEDevice *)device;

@end
